package com.gxa.modules.app.hospitalization.persional.service.impl;


import com.gxa.modules.app.hospitalization.persional.dto.DayPriceDto;
import com.gxa.modules.app.hospitalization.persional.dto.DayTotalPriceDto;
import com.gxa.modules.app.hospitalization.persional.mapper.DayListMapper;
import com.gxa.modules.app.hospitalization.persional.service.DayListService;
import com.gxa.modules.model.entity.fee.Patient;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class DayListServiceImpl implements DayListService {
    @Resource
    private DayListMapper dayListMapper;
    @Override
    public Patient select() {
        Patient patient = dayListMapper.selectByStatus();
        return patient;
    }

    @Override
    public List<DayPriceDto> selectByTime(Date dateTime , Integer id) {
        List<DayPriceDto> dayPriceDtos = dayListMapper.query(dateTime, id);
        return dayPriceDtos;
    }
//    public List<Patient> query(Integer id) {
//        List<Patient> patients = patientMapper.selectAllById(id);
//
//        return patients
    @Override
    public DayTotalPriceDto selectTotalPrice(Date dateTime, Integer id) {
        return dayListMapper.query01(dateTime , id);
    }
}
